<?php
/**
 * Description of PetFacade
 *
 * @author KAZAK
 */
class BlogFacade {
    //put your code here

    public static function savePost(Post $post)
    {
        return $post->save();
    }

    public static function deletepost(Post $post)
    {
        $post->delete();
    }

    public static function loadModel($id)
    {
        $post = Post::model()->findByPk((int)$id);
        if ($post == null)
        {
            throw new CHttpException(404,'The requested page does not exist.');
        }
    }
}
?>
